package pattern.singleton.demo1;

/**
 * @Author suzhengzhuang
 * @Email: suzhengzhuang@icloud.com
 * @Date 2024/4/17 10:08
 * @PackageName:pattern.singleton.demo1
 * @ClassName: Client
 * @Description: TODO
 * @Version 1.0
 */
public class Client {

    public static void main(String[] args) {

        // 创建Singleton类的对象
        Singleton instance = Singleton.getInstance();

        Singleton instance2 = Singleton.getInstance();
        // 输出true 证明获取的对象时同一个对象
        System.out.println(instance == instance2);
    }
}
